package com.example.mybrowser;

import java.util.Timer;
import java.util.TimerTask;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.util.Log;
import android.webkit.WebView;

public class GetWebpageService extends Service
{
	Timer timer = new Timer();
	TimerTask task = new TimerTask(){  
		  
        public void run() {         
            Message message = new Message();
            message.what = 1;
            doActionHandler.sendMessage(message);
        }  
          
    };
    private Handler doActionHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            int msgId = msg.what;
            Log.v("xxx", "handler");
        }
    };
	@Override
	public void onCreate()
	{
		// TODO Auto-generated method stub
		super.onCreate();
		timer.schedule(task, 0, 1000);
		Log.v("xxx", "oncreat");
	}

	@Override
	public void onDestroy()
	{
		// TODO Auto-generated method stub
		super.onDestroy();
	}

	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		Log.v("xxx", "bind");
		return null;
	}
}